//
//  ConditionCell.m
//  YSSmartHome
//
//  Created by yanghao on 16/9/12.
//  Copyright © 2016年 yahaong. All rights reserved.
//

#import "AddConditionCell.h"
#import "YHMarcros.h"

@interface AddConditionCell ()

@property(nonatomic, strong)UIButton *m_btnAdd;
@end
@implementation AddConditionCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self.contentView addSubview:self.m_btnAdd];
        [self.m_btnAdd mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.equalTo(self.contentView);
        }];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setM_strAddBtnTitle:(NSString *)m_strAddBtnTitle
{
    _m_strAddBtnTitle = [m_strAddBtnTitle copy];
    [_m_btnAdd setTitle:self.m_strAddBtnTitle forState:UIControlStateNormal];
    
}
- (UIButton *)m_btnAdd
{
    if (!_m_btnAdd) {
        _m_btnAdd = [[UIButton alloc]init];
        [_m_btnAdd setImage:[UIImage imageNamed:@"scene_add"] forState:UIControlStateNormal];
       // [_m_btnAdd setTitle:@"添加新条件" forState:UIControlStateNormal];
        [_m_btnAdd setTitleColor:RGBColor(153, 153, 153) forState:UIControlStateNormal];
        _m_btnAdd.titleLabel.font = [UIFont systemFontOfSize:14];
        _m_btnAdd.titleEdgeInsets  = UIEdgeInsetsMake(0, 5, 0, -5);
        _m_btnAdd.imageEdgeInsets = UIEdgeInsetsMake(0, -5, 0, 5);
        _m_btnAdd.userInteractionEnabled = NO;
        
    }
    return _m_btnAdd;
}
@end
